from rest_framework import serializers

from home.models import NavCategory, Banner


class NavCategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = NavCategory
        fields = ['id', 'name', 'display_name', 'weight', 'external_link']


class BannerSerializer(serializers.ModelSerializer):
    class Meta:
        model = Banner
        fields = ['id', 'image', 'link', 'note']
